import React, { Component } from "react"

export class ReduceCounter extends Component {
    subReduce(count) {
        this.props.subClick(count)
    }

    render() {
        return (
            <div>
                <button onClick={() => this.subReduce(1)}>-1</button>
                <button onClick={() => this.subReduce(5)}>-5</button>
                <button onClick={() => this.subReduce(10)}>-10</button>
            </div>
        )
    }
}

export default ReduceCounter
